﻿Imports Phila
Imports Phila.Sql
Imports Phila.CommonClasses

Public Class Zones
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Try
            If Not Request.QueryString("cid") Is Nothing Then
                Dim strSql As String
                strSql = "select distinct z.* from ptn_Zones z inner join ptn_CatZoneTours cz on cz.ZoneId=z.Id where cz.CountryId=" & Request.QueryString("cid")
                Fill_dtList(dlTours, strSql)
                Dim txt As Array
                txt = RetriveData("select Name from ptn_Countries where Id=" & Request.QueryString("cid"), 0)
                ltrTitle.Text = "<h2>Zones in " & txt(0) & " </h2>"
                If dlTours.Items.Count = 0 Then
                    lblMsg.Text = "No Records"
                    Response.Redirect("CountryTours.aspx?cid=" & Request.QueryString("cid"))
                End If
            End If
        Catch ex As Exception
            Throw ex
        End Try
    End Sub

    'Protected Function ShowThumbnail(ByVal Image As String)
    '    Dim strImage As String
    '    If Image Is Nothing Then
    '        strImage = "Images/no-image.jpg"
    '    Else
    '        strImage = "Images/Img/" & Image
    '    End If
    '    Return strImage
    'End Function

End Class